window: Remove GList link directly
authorTimm Bäder <mail@baedert.org>
Sun, 10 Feb 2019 09:28:32 +0000 (10:28 +0100)
committerTimm Bäder <mail@baedert.org>
Sun, 10 Feb 2019 09:31:27 +0000 (10:31 +0100)
Instead of walking the list again and looking for the GList pointer we
already have.

gtk/gtkwindow.c

index 38690e7e56287d4af76bbdd8914fc0211eaa09d3..db108c8a2d115a48ada336a5ae37309b2ec7bf29 100644 (file)
@@ -10707,7 +10707,8 @@ gtk_window_update_pointer_focus_on_state_change (GtkWindow *window,
       if (GTK_WIDGET (focus->toplevel) == widget)
         {
           /* Unmapping the toplevel, remove pointer focus */
-          gtk_window_remove_pointer_focus (window, focus);
+          priv->foci = g_list_remove_link (priv->foci, cur);
+          gtk_pointer_focus_unref (focus);
         }
       else if (focus->target == widget ||
                gtk_widget_is_ancestor (focus->target, widget))